
//
//  UIButton+Extension.swift
//  Sina
//
//  Created by YYY on 2017/7/27.
//  Copyright © 2017年 成品家（北京）网路科技有限公司. All rights reserved.
//

//import Foundation
//import UIKit

extension UIButton
{
    convenience init(frame: CGRect,titleStr: String,titleColor: UIColor,fontSize: CGFloat,isBorder: Bool)
    {
        self.init(frame: frame)
        
        self.setTitle(titleStr, for: .normal)
        self.setTitleColor(titleColor, for: .normal)
        self.titleLabel?.font = UIFont.systemFont(ofSize: fontSize)
        
        if isBorder
        {
            self.layer.borderColor = UIColor.lightGray.cgColor
            self.layer.borderWidth = 0.3
            self.layer.cornerRadius = 5
        }
    }
}
